https://leetcode-cn.com/problems/max-area-of-island/
主要是对于&count

class Solution {
public:
    int v_x[4] = {1, 0, -1, 0};
    int v_y[4] = {0 , 1, 0, -1};
    void dfs(vector<vector<int>>& grid,int x,int y,int* count)
    {
        grid[x][y] = 0;
        (*count)++;
        int n = grid.size();
        int m = grid[0].size();
        for(int i = 0 ; i < 4; i++)
        {
            int nx = x+v_x[i];
            int ny = y+v_y[i];
            if(nx < 0 || ny < 0 || nx >= n || ny >= m) 
                continue;
            if(grid[nx][ny] == 1)
            {
                dfs(grid,nx,ny,count);
            }
        }
    }
    int maxAreaOfIsland(vector<vector<int>>& grid) {
        int n = grid.size();
        if(n == 0) return 0;
        int m = grid[0].size();
        int max = 0;
        for(int i = 0 ; i < n ; i++)
        {
            for(int j = 0 ; j < m ; j++)
            {
                if(grid[i][j] == 1)
                {
                    int count = 0;
                    dfs(grid,i,j,&count);
                    if(count > max)
                    {
                        max = count;
                    } 
                }
            }
        }
        return max;
    }
};